package br.com.stourados.perfil.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;

public class WdgtPergunta extends Composite {

	private Label lblAvaliado;
	private HorizontalPanel horizontalPanel;
	private HorizontalPanel horizontalPanel_1;
	private Button btnNewButton_2;
	private Button btnLimpar;
	
	public WdgtPergunta() {
		
		VerticalPanel verticalPanel = new VerticalPanel();
		verticalPanel.setBorderWidth(0);
		verticalPanel.setStyleName("borderBottom");
		initWidget(verticalPanel);
		verticalPanel.setSize("401px", "87px");
		
		Label lblVocJaMexeu = new Label("Voc\u00EA ja mexeu na rebimboca da parafuseta?");
		verticalPanel.add(lblVocJaMexeu);
		lblVocJaMexeu.setHeight("18px");
		
		TextArea txtrJMuitasVezes = new TextArea();
		txtrJMuitasVezes.setText("J\u00E1, muitas vezes.");
		txtrJMuitasVezes.setReadOnly(true);
		verticalPanel.add(txtrJMuitasVezes);
		txtrJMuitasVezes.setSize("395px", "20px");
		
		horizontalPanel_1 = new HorizontalPanel();
		horizontalPanel_1.setVisible(false);
		verticalPanel.add(horizontalPanel_1);
		
		lblAvaliado = new Label("Avaliado! - Creio");
		lblAvaliado.setStyleName("sim");
		horizontalPanel_1.add(lblAvaliado);
		lblAvaliado.setWidth("260px");
		
		btnLimpar = new Button("Limpar");
		horizontalPanel_1.add(btnLimpar);
		btnLimpar.setWidth("80px");
		btnLimpar.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				lblAvaliado.setStyleName("sim");
				lblAvaliado.setText("Avaliado - Creio");
				horizontalPanel.setVisible(true);
				horizontalPanel_1.setVisible(false);
			}
		});
		
		horizontalPanel = new HorizontalPanel();
		horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		verticalPanel.add(horizontalPanel);
		horizontalPanel.setWidth("401px");
		
		Button btnNewButton = new Button("Creio");
		btnNewButton.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				horizontalPanel_1.setVisible(true);
				horizontalPanel.setVisible(false);
			}
		});
		horizontalPanel.add(btnNewButton);
		btnNewButton.setWidth("80px");
		
		btnNewButton_2 = new Button("N\u00E3o Creio");
		btnNewButton_2.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				lblAvaliado.setStyleName("no");
				lblAvaliado.setText("Avaliado - N\u00E3o Creio");
				horizontalPanel_1.setVisible(true);
				horizontalPanel.setVisible(false);
	
			
			}
		});
		horizontalPanel.add(btnNewButton_2);
		btnNewButton_2.setWidth("80px");
	}

}
